Skip to content

Conversation

@dpiddock
Copy link

A follow-on from #193, this adds the tofu extensions to the format-on-save list.

@dimbleby
Copy link
Contributor

dimbleby commented Nov 1, 2025

I'm inclined to think that #193 was a mistake and should be undone, rather than going further down that path.

Are .tofu and .tf files the same or not?

  • if yes, then folk can either use the .tf extension all along, or else set up their own filetype detection
  • if no, then it is a mistake to treat them as if they are the same

What I don't want is to slip gradually into accidental support for a non-terraform filetype

@yermulnik
Copy link

Are .tofu and .tf files the same or not?

They are the same. OpenTofu prefers .tofu over .tf files if they have the same base name, but otherwise OpenTofu reads both. Terraform ignores .tofu files obviously.
Ref: https://opentofu.org/docs/language/files/

ps: I'm not a user of OpenTofu though, just wanted to add clarity FWIW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants